package com.team7.stat.controller;

import com.team7.stat.entity.Member;
import com.team7.stat.service.MemberService;
import com.team7.stat.utils.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName: MemberController
 * @Description: 会员表 前端控制器
 * @Author: 赵孟阳
 * @Date: 2021/10/19 21:31
 */
@RestController
@RequestMapping("/stat/member")
@Api(tags = "用户类型排行榜")
public class MemberController {
    @Resource
    private MemberService memberService;

    @ApiOperation(value = "根据count查询所有类型")
    @PostMapping("/queryMemberTypeBang")
    public CommonResult queryMemberTpeBang(@RequestBody Member member) {
        CommonResult commonResult = memberService.queryMemberTypeBang(member);
        System.out.println(commonResult);
        return commonResult;
    }
}
